home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1999 November / SOTMC_Nov1999-Ultimate.iso / mac / REALbasic ƒ / Examples / Techniques / Examples by Thomas Tempelmann / FAQs from RB-NUG mailing list / load⁄modify rsrcs in plugins < prev    next >
MacBinary  |  1999-07-06  |  2.5 KB  |  [clpt/drag]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Thu May 6 10:13:36 1999, modified Tue Jul 6 15:26:52 1999, creator 'drag', type 'clpt' "load/modify rsrcs in plugins", at 0x80 2356 bytes resource Apple HFS/HFS+ resource fork, map offset 0x8c6, map length 0x6e, data length 0x7c6, at 16 0x73000000, nextResourceMap 0x975f700, fileRef 0x336a, list offset 0x1c, name offset 0x6e, 4 types, 0x54455854 'TEXT' * 1 resource offset 0x22 default (weak)
99% file data default
49% TrID Mac Text clippings (MacBinary) default
33% TrID SpeedScript document (C64) default (weak)
16% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[clpt]
macFileCreator[drag]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 1c 6c 6f 61 64 2f 6d | 6f 64 69 66 79 20 72 73 |..load/m|odify rs|
|00000010| 72 63 73 20 69 6e 20 70 | 6c 75 67 69 6e 73 00 00 |rcs in p|lugins..|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 63 6c 70 74 64 72 61 | 67 01 00 00 00 00 00 00 |.clptdra|g.......|
|00000050| 00 00 00 00 00 00 00 00 | 00 09 34 b3 57 54 10 b3 |........|..4.WT..|
|00000060| a8 08 fc 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 bb 51 00 00 |........|.....Q..|
|00000080| 00 00 01 00 00 00 08 c6 | 00 00 07 c6 00 00 00 6e |........|.......n|
|00000090| 73 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.......|........|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 22 6d af | 31 ed 40 41 50 50 4c 57 |....."m.|1.@APPLW|
|000000d0| 6e 47 39 ff ff ff ff 00 | 00 00 00 00 00 00 00 00 |nG9.....|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 0d 51 75 69 63 6b |........|...Quick|
|000000f0| 54 61 6b 65 20 32 30 30 | 00 00 01 00 0c 00 00 22 |Take 200|......."|
|00000100| 6c 00 00 0d b7 00 00 00 | e6 00 02 00 2e 54 42 32 |l.......|.....TB2|
|00000110| 3a 44 69 76 65 72 73 65 | 3a 47 72 61 66 69 6b 3a |:Diverse|:Grafik:|
|00000120| 51 75 69 63 6b 54 61 6b | 65 20 32 30 30 3a 43 61 |QuickTak|e 200:Ca|
|00000130| 6d 65 72 61 20 41 63 63 | 65 73 73 ff ff 00 00 00 |mera Acc|ess.....|
|00000140| 00 00 20 50 49 43 54 4d | 6f 6f 56 4a 50 45 47 54 |.. PICTM|ooVJPEGT|
|00000150| 49 46 46 45 58 49 46 57 | 6e 47 39 71 74 69 63 3f |IFFEXIFW|nG9qtic?|
|00000160| 3f 3f 3f 00 00 01 00 00 | 00 00 00 00 07 c0 00 00 |???.....|........|
|00000170| 1f e1 00 00 3f ff c0 00 | 3f ff e0 00 7f ff e0 00 |....?...|?.......|
|00000180| 00 00 07 4c 49 27 76 65 | 20 66 6f 75 6e 64 20 61 |...LI've| found a|
|00000190| 20 75 67 6c 79 20 62 75 | 67 20 69 6e 20 52 42 20 | ugly bu|g in RB |
|000001a0| 74 68 61 74 20 63 61 6e | 20 63 61 75 73 65 20 61 |that can| cause a|
|000001b0| 20 6c 6f 74 20 6f 66 20 | 68 65 61 64 61 63 68 65 | lot of |headache|
|000001c0| 73 0d 66 6f 72 20 70 6c | 75 67 69 6e 20 70 72 6f |s.for pl|ugin pro|
|000001d0| 67 72 61 6d 6d 65 72 73 | 2e 0d 4d 79 20 48 69 64 |grammers|..My Hid|
|000001e0| 65 4d 65 6e 75 62 61 72 | 20 76 31 2e 31 20 77 61 |eMenubar| v1.1 wa|
|000001f0| 73 20 74 72 61 70 70 69 | 6e 67 20 69 6e 74 6f 20 |s trappi|ng into |
|00000200| 74 68 69 73 20 6f 6e 65 | 2c 20 61 6e 64 20 69 74 |this one|, and it|
|00000210| 20 74 6f 6f 6b 20 6d 65 | 0d 61 62 6f 75 74 20 33 | took me|.about 3|
|00000220| 20 68 6f 75 72 73 20 74 | 6f 20 66 69 67 75 72 65 | hours t|o figure|
|00000230| 20 6f 75 74 20 77 68 61 | 74 20 77 61 73 20 63 61 | out wha|t was ca|
|00000240| 75 73 69 6e 67 20 74 68 | 65 20 70 72 6f 62 6c 65 |using th|e proble|
|00000250| 6d 20 61 6e 64 0d 61 6e | 6f 74 68 65 72 20 68 6f |m and.an|other ho|
|00000260| 75 72 20 74 6f 20 66 69 | 6e 64 20 74 68 65 20 77 |ur to fi|nd the w|
|00000270| 6f 72 6b 61 72 6f 75 6e | 64 2e 0d 0d 54 68 65 20 |orkaroun|d...The |
|00000280| 6d 69 73 62 65 68 61 76 | 69 6f 75 72 20 69 6e 20 |misbehav|iour in |
|00000290| 52 42 20 63 61 75 73 69 | 6e 67 20 74 68 65 20 74 |RB causi|ng the t|
|000002a0| 72 6f 75 62 6c 65 20 69 | 73 20 74 68 69 73 3a 0d |rouble i|s this:.|
|000002b0| 0d 49 66 20 52 42 20 6c | 69 6e 6b 73 20 61 20 61 |.If RB l|inks a a|
|000002c0| 70 70 20 61 6e 64 20 69 | 6e 63 6c 75 64 65 73 20 |pp and i|ncludes |
|000002d0| 79 6f 75 72 20 70 6c 75 | 67 69 6e 2c 20 61 6e 64 |your plu|gin, and|
|000002e0| 20 69 66 20 79 6f 75 20 | 70 6c 75 67 69 6e 0d 75 | if you |plugin.u|
|000002f0| 73 65 73 20 61 64 64 69 | 74 69 6f 6e 61 6c 20 72 |ses addi|tional r|
|00000300| 65 73 6f 75 72 63 65 73 | 20 28 64 65 63 6c 61 72 |esources| (declar|
|00000310| 65 64 20 69 6e 20 74 68 | 65 20 50 4c 52 6d 20 72 |ed in th|e PLRm r|
|00000320| 65 73 6f 75 72 63 65 29 | 2c 0d 74 68 65 6e 20 52 |esource)|,.then R|
|00000330| 42 20 77 69 6c 6c 20 74 | 61 6b 65 20 74 68 6f 73 |B will t|ake thos|
|00000340| 65 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 72 73 72 |e additi|onal rsr|
|00000350| 63 73 20 66 72 6f 6d 20 | 6d 65 6d 6f 72 79 20 28 |cs from |memory (|
|00000360| 74 68 61 74 20 69 73 2c | 0d 66 72 6f 6d 20 74 68 |that is,|.from th|
|00000370| 65 20 63 75 72 72 65 6e | 74 6c 79 20 6f 70 65 6e |e curren|tly open|
|00000380| 20 72 65 73 6f 75 72 63 | 65 20 66 69 6c 65 29 20 | resourc|e file) |
|00000390| 69 6e 73 74 65 61 64 20 | 6f 66 20 75 73 69 6e 67 |instead |of using|
|000003a0| 20 74 68 65 0d 6f 72 69 | 67 69 6e 61 6c 20 72 65 | the.ori|ginal re|
|000003b0| 73 6f 75 72 63 65 73 20 | 74 68 61 74 20 61 72 65 |sources |that are|
|000003c0| 20 73 74 6f 72 65 64 20 | 69 6e 20 79 6f 75 72 20 | stored |in your |
|000003d0| 70 6c 75 67 69 6e 2e 0d | 0d 57 68 69 6c 65 20 74 |plugin..|.While t|
|000003e0| 68 69 73 20 69 73 20 6e | 6f 74 20 61 20 70 72 6f |his is n|ot a pro|
|000003f0| 62 6c 65 6d 20 69 6e 20 | 6d 6f 73 74 20 63 61 73 |blem in |most cas|
|00000400| 65 73 2c 20 69 74 20 77 | 69 6c 6c 20 62 65 20 74 |es, it w|ill be t|
|00000410| 72 6f 75 62 6c 65 0d 69 | 66 20 79 6f 75 72 20 70 |rouble.i|f your p|
|00000420| 6c 75 67 69 6e 20 6d 6f | 64 69 66 69 65 73 20 74 |lugin mo|difies t|
|00000430| 68 65 20 72 65 73 6f 75 | 72 63 65 20 61 66 74 65 |he resou|rce afte|
|00000440| 72 20 6c 6f 61 64 69 6e | 67 20 69 74 2e 20 49 6e |r loadin|g it. In|
|00000450| 0d 63 6f 6d 6d 6f 6e 20 | 4d 61 63 20 4f 53 20 74 |.common |Mac OS t|
|00000460| 65 72 6d 73 2c 20 74 68 | 69 73 20 69 73 20 61 6c |erms, th|is is al|
|00000470| 6c 6f 77 65 64 20 2d 20 | 79 6f 75 20 63 61 6e 20 |lowed - |you can |
|00000480| 6c 6f 61 64 20 61 20 72 | 65 73 6f 75 72 63 65 0d |load a r|esource.|
|00000490| 69 6e 74 6f 20 6d 65 6d | 6f 72 79 20 61 6e 64 20 |into mem|ory and |
|000004a0| 74 68 65 6e 20 6d 6f 64 | 69 66 79 20 69 74 20 2d |then mod|ify it -|
|000004b0| 20 69 74 20 77 6f 6e 27 | 74 20 62 65 20 77 72 69 | it won'|t be wri|
|000004c0| 74 74 65 6e 20 62 61 63 | 6b 0d 74 6f 20 79 6f 75 |tten bac|k.to you|
|000004d0| 72 20 72 65 73 6f 75 72 | 63 65 20 66 69 6c 65 20 |r resour|ce file |
|000004e0| 75 6e 6c 65 73 73 20 79 | 6f 75 20 65 78 70 6c 69 |unless y|ou expli|
|000004f0| 63 69 74 6c 79 20 61 73 | 6b 20 66 6f 72 20 74 68 |citly as|k for th|
|00000500| 61 74 2e 0d 52 42 27 73 | 20 6c 69 6e 6b 20 70 72 |at..RB's| link pr|
|00000510| 6f 63 65 73 73 2c 20 68 | 6f 77 65 76 65 72 2c 20 |ocess, h|owever, |
|00000520| 63 72 65 61 74 65 73 20 | 61 6e 20 69 6d 70 6c 69 |creates |an impli|
|00000530| 63 69 74 20 75 70 64 61 | 74 65 2c 0d 62 65 63 61 |cit upda|te,.beca|
|00000540| 75 73 65 20 77 68 65 6e | 20 69 74 20 6c 69 6e 6b |use when| it link|
|00000550| 73 20 74 68 65 20 61 70 | 70 20 77 69 74 68 20 79 |s the ap|p with y|
|00000560| 6f 75 72 20 70 6c 75 67 | 69 6e 20 72 65 73 6f 75 |our plug|in resou|
|00000570| 72 63 65 73 2c 20 69 74 | 0d 77 69 6c 6c 20 6c 69 |rces, it|.will li|
|00000580| 6e 6b 20 74 68 65 20 6d | 6f 64 69 66 69 65 64 20 |nk the m|odified |
|00000590| 72 65 73 6f 75 72 63 65 | 20 74 68 61 74 20 79 6f |resource| that yo|
|000005a0| 75 20 68 61 76 65 20 69 | 6e 20 6d 65 6d 6f 72 79 |u have i|n memory|
|000005b0| 2e 0d 54 68 69 73 20 6d | 69 67 68 74 20 63 61 75 |..This m|ight cau|
|000005c0| 73 65 20 70 72 6f 62 6c | 65 6d 73 20 64 65 70 65 |se probl|ems depe|
|000005d0| 6e 64 69 6e 67 20 6f 6e | 20 68 6f 77 20 74 68 69 |nding on| how thi|
|000005e0| 73 20 72 65 73 6f 75 72 | 63 65 0d 69 73 20 75 73 |s resour|ce.is us|
|000005f0| 65 64 2e 0d 0d 54 68 69 | 73 20 62 75 67 20 61 70 |ed...Thi|s bug ap|
|00000600| 70 65 61 72 73 20 69 6e | 20 52 42 20 31 2e 31 2e |pears in| RB 1.1.|
|00000610| 31 20 61 73 20 77 65 6c | 6c 20 61 73 20 69 6e 20 |1 as wel|l as in |
|00000620| 52 42 20 32 2e 30 2e 32 | 61 32 2e 0d 0d 41 6e 64 |RB 2.0.2|a2...And|
|00000630| 20 68 65 72 65 27 73 20 | 61 20 77 6f 72 6b 61 72 | here's |a workar|
|00000640| 6f 75 6e 64 3a 0d 0d 44 | 65 74 61 63 68 20 74 68 |ound:..D|etach th|
|00000650| 65 20 72 65 73 6f 75 72 | 63 65 20 6f 6e 63 65 20 |e resour|ce once |
|00000660| 79 6f 75 20 68 61 76 65 | 20 6c 6f 61 64 65 64 20 |you have| loaded |
|00000670| 69 74 3a 20 43 61 6c 6c | 20 44 65 74 61 63 68 52 |it: Call| DetachR|
|00000680| 65 73 6f 75 72 63 65 0d | 77 69 74 68 20 74 68 65 |esource.|with the|
|00000690| 20 72 73 72 63 20 68 61 | 6e 64 6c 65 2e 20 54 68 | rsrc ha|ndle. Th|
|000006a0| 65 6e 20 79 6f 75 20 63 | 61 6e 20 6d 6f 64 69 66 |en you c|an modif|
|000006b0| 79 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 2c 20 |y the re|source, |
|000006c0| 61 6e 64 0d 6c 61 74 65 | 72 2c 20 77 68 65 6e 20 |and.late|r, when |
|000006d0| 52 42 20 6c 69 6e 6b 73 | 20 74 68 65 20 61 70 70 |RB links| the app|
|000006e0| 2c 20 69 74 20 77 69 6c | 6c 20 6e 6f 74 20 75 73 |, it wil|l not us|
|000006f0| 65 20 79 6f 75 72 20 6c | 6f 61 64 65 64 20 72 65 |e your l|oaded re|
|00000700| 73 6f 75 72 63 65 2c 0d | 62 75 74 20 77 69 6c 6c |source,.|but will|
|00000710| 20 67 65 74 20 61 20 6e | 65 77 2c 20 63 6c 65 61 | get a n|ew, clea|
|00000720| 6e 2c 20 6f 6e 65 20 66 | 72 6f 6d 20 74 68 65 20 |n, one f|rom the |
|00000730| 72 65 73 6f 75 72 63 65 | 20 66 69 6c 65 2e 0d 54 |resource| file..T|
|00000740| 68 65 20 6f 6e 6c 79 20 | 72 65 73 74 72 69 63 74 |he only |restrict|
|00000750| 69 6f 6e 20 75 73 69 6e | 67 20 74 68 69 73 20 74 |ion usin|g this t|
|00000760| 65 63 68 6e 69 71 75 65 | 20 69 73 20 74 68 61 74 |echnique| is that|
|00000770| 20 79 6f 75 20 63 61 6e | 6e 6f 74 0d 75 70 64 61 | you can|not.upda|
|00000780| 74 65 20 74 68 61 74 20 | 72 65 73 6f 75 72 63 65 |te that |resource|
|00000790| 20 69 6e 20 74 68 65 20 | 72 65 73 6f 75 72 63 65 | in the |resource|
|000007a0| 20 66 69 6c 65 20 61 6e | 79 20 6d 6f 72 65 20 6f | file an|y more o|
|000007b0| 6e 63 65 20 79 6f 75 20 | 68 61 76 65 0d 64 65 74 |nce you |have.det|
|000007c0| 61 63 68 65 64 20 69 74 | 2e 20 46 6f 72 20 61 20 |ached it|. For a |
|000007d0| 70 6c 75 67 69 6e 2c 20 | 74 68 69 73 20 64 6f 65 |plugin, |this doe|
|000007e0| 73 20 6e 6f 74 20 6d 61 | 6b 65 20 61 6e 79 20 73 |s not ma|ke any s|
|000007f0| 65 6e 73 65 2c 20 61 6e | 79 77 61 79 2c 0d 68 6f |ense, an|yway,.ho|
|00000800| 77 65 76 65 72 2c 20 73 | 6f 20 74 68 61 74 20 79 |wever, s|o that y|
|00000810| 6f 75 20 63 61 6e 20 6d | 61 6b 65 20 74 68 69 73 |ou can m|ake this|
|00000820| 20 62 6c 69 6e 64 6c 79 | 20 61 20 72 75 6c 65 20 | blindly| a rule |
|00000830| 41 4c 57 41 59 53 20 74 | 6f 20 66 6f 6c 6c 6f 77 |ALWAYS t|o follow|
|00000840| 0d 69 66 20 79 6f 75 20 | 6c 6f 61 64 20 61 6e 79 |.if you |load any|
|00000850| 20 6f 74 68 65 72 20 72 | 65 73 6f 75 72 63 65 73 | other r|esources|
|00000860| 20 69 6e 20 79 6f 75 72 | 20 70 6c 75 67 69 6e 3a | in your| plugin:|
|00000870| 0d 0d 20 20 20 41 66 74 | 65 72 20 61 6e 79 20 47 |.. Aft|er any G|
|00000880| 65 74 52 65 73 6f 75 72 | 63 65 28 68 64 6c 29 20 |etResour|ce(hdl) |
|00000890| 28 6f 72 20 73 69 6d 69 | 6c 61 72 29 20 63 61 6c |(or simi|lar) cal|
|000008a0| 6c 73 2c 20 6d 61 6b 65 | 20 61 0d 20 20 20 44 65 |ls, make| a. De|
|000008b0| 74 61 63 68 52 65 73 6f | 75 72 63 65 28 68 64 6c |tachReso|urce(hdl|
|000008c0| 29 20 63 61 6c 6c 2e 0d | 0d 54 68 6f 6d 61 73 0d |) call..|.Thomas.|
|000008d0| 00 00 00 16 00 01 00 00 | 00 00 00 0b 00 09 00 04 |........|........|
|000008e0| 00 00 00 09 00 00 00 00 | 00 00 00 00 00 30 00 00 |........|.....0..|
|000008f0| 00 01 00 00 00 04 00 00 | 00 00 00 00 00 02 54 45 |........|......TE|
|00000900| 58 54 00 00 01 00 00 00 | 00 00 00 00 00 00 73 74 |XT......|......st|
|00000910| 79 6c 00 00 01 00 00 00 | 00 00 00 00 00 00 00 00 |yl......|........|
|00000920| 00 24 00 00 00 05 00 01 | 04 07 00 3b 00 2f 02 66 |.$......|...;./.f|
|00000930| 02 1b 00 00 00 00 00 00 | 01 70 8c 00 00 00 09 99 |........|.p......|
|00000940| 91 e0 00 00 00 00 00 00 | 01 00 00 00 08 c6 00 00 |........|........|
|00000950| 07 c6 00 00 00 6e 09 75 | f7 00 33 6a 00 00 00 1c |.....n.u|..3j....|
|00000960| 00 6e 00 03 54 45 58 54 | 00 00 00 22 73 74 79 6c |.n..TEXT|..."styl|
|00000970| 00 00 00 2e 64 72 61 67 | 00 00 00 3a 6b 77 73 74 |....drag|...:kwst|
|00000980| 00 00 00 46 01 00 ff ff | 00 00 00 00 00 00 00 00 |...F....|........|
|00000990| 01 00 ff ff 00 00 07 50 | 00 00 00 00 00 80 ff ff |.......P|........|
|000009a0| 00 00 07 6a 00 00 00 00 | bf 4c ff ff 00 00 07 9e |...j....|.L......|
|000009b0| 00 dd 0e b0 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+